import { request } from '@/utils/request.js';

const url = '/adminapi/setting/';

/**
 * 上传配置
 */
export function apiUploadConfig(data, method = 'get') {
  if (method === 'get') {
    return request({
      url: `${url}uploadConfig`,
      method: 'get',
      params: data,
    });
  }
  return request({
    url: `${url}uploadConfig`,
    method: 'post',
    data: data,
  });
}

/**
 * 支付配置
 */
export function apiPaymentConfig(data, method = 'get') {
  if (method === 'get') {
    return request({
      url: `${url}paymentConfig`,
      method: 'get',
      params: data,
    });
  }
  return request({
    url: `${url}paymentConfig`,
    method: 'post',
    data: data,
  });
}
